package com.empire.module.infra.job.location;

import com.empire.framework.quartz.core.handler.JobHandler;
import com.empire.module.infra.service.location.ApiLocationHistoryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 清理6月之前的历史定位数据
 */
@Slf4j
@Component
public class LocationHistoryJob  implements JobHandler {

    @Resource
    private ApiLocationHistoryService apiLocationHistoryService;

    @Override
    public String execute(String param) throws Exception {
        apiLocationHistoryService.clean6YearHistoryLocation();
        return "删除6个月之前的轨迹的数据完成。";
    }
}
